package com.shipment.config;


import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author Mars.wq [wqexpore@163.com]
 * @version 1.0
 * @date 2025-04-28 16:04
 **/
@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        // 让 /upload/** 映射到本地文件 upload 目录
        registry.addResourceHandler("/files/**")
                .addResourceLocations("file:D:/upload/");
    }
}
